package com.zretc.controller;

import com.zretc.service.FindDateService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/date")
public class FindDateController {

    private static final Logger logger = LoggerFactory.getLogger(FindDateController.class);

    @Autowired
    private FindDateService service;

    @RequestMapping("/findWeekByWeek")
    @ResponseBody
    public Map<Integer, Object> findWeekByWeek(@RequestParam(value = "month") Integer month){
        Map<Integer, Object> map = service.findWeekByWeek(month);
        return map;
    }
}
